/*
 * greenFile.h
 *
 * Created: 04.10.2012 14:21:08
 *  Author: vegardvo
 */ 


#ifndef GREENFILE_H_
#define GREENFILE_H_

//oledDriver_write_char('A',2);
		
		//struct joystickDir dir = joystick_getDir();
		//printf("x_dir: %d\ny_dir%d\r", dir.x_dir, dir.y_dir);
		//printf("%d    \r", adc_read(4));
		//struct joystickPos pos = inputDriver_joystick_getPos();
		//struct joystickDirection dir = inputDriver_joystick_getDir();
		//struct sliderPos spos = slider_getPos();
		//printf("x_pos: %d y_pos: %d       ", pos.x_pos, pos.y_pos);
		//printf("x_dir: %d y_dir: %d       \r", dir.x_dir, dir.y_dir);
		//printf("joy: %d A: %d B: %d \r", getButton(JOY), getButton(A), getButton(B));
		//printf("Slider L: %d R: %d \r", spos.L_pos, spos.R_pos);
		//oledDriver_write_data(0x00/*{0b01111100,0b01111110,0b00010011,0b00010011,0b01111110,0b01111100,0b00000000,0b00000000}*/);
		//printf("Test_char: %d\r", test_char);
		/*oledDriver_write_data(0b01111100);
		oledDriver_write_data(0b01111110);
		oledDriver_write_data(0b00010011);
		oledDriver_write_data(0b00010011);
		oledDriver_write_data(0b01111110);
		oledDriver_write_data(0b01111100);
		oledDriver_write_data(0b00000000);
		oledDriver_write_data(0b00000000);*/
		
		
	
	//volatile char *OLED_DATA = (char *) 0x1200;
	
	/*
	for(int i = 0; i < 8; i++)
	{
		for(int j = 0; j < 16; j++){
			oledDriver_select_page(i);
			oledDriver_select_segment(j*8);
			writeA();
		}		
	}*/
	/*for(int j = 0; j < 8; j++)
	{
		oledDriver_select_page(j);
	
	for(int i = 0; i < 16; i++)
	{
		writeA();
	}
	}*/
	
	/*oledDriver_select_page(0);
	oledDriver_write_string("halla", 0, TRUE);
	oledDriver_select_page(1);
	oledDriver_write_string("Vegard!", 0, TRUE);
	oledDriver_select_page(2);
	oledDriver_write_string(" ", 0, TRUE);
	oledDriver_select_page(3);
	oledDriver_write_string("Sjekk ut hvor", 0, TRUE);
	oledDriver_select_page(4);
	oledDriver_write_string("droyt villt", 0, TRUE);
	oledDriver_select_page(5);
	oledDriver_write_string("SUPERFLINKE", TRUE, TRUE);
	oledDriver_select_page(6);
	oledDriver_write_string("vi", 0, TRUE);
	oledDriver_select_page(7);
	oledDriver_write_string("er!", 0, TRUE);
	
	_delay_ms(2000);
	oledDriver_select_page(2);
	oledDriver_select_segment(0);
	char * buff = "";
	sprintf(buff, "hei, et tall: %d", 5);
	oledDriver_write_string(buff, 0, TRUE);
	_delay_ms(8000);
	oledDriver_clear_line(2);*/
	
	
	/*
	void write0()
	{
		
		oledDriver_write_data(0b00111110);// = 0
		oledDriver_write_data(0b01111111);
		oledDriver_write_data(0b01011001);
		oledDriver_write_data(0b01001101);
		oledDriver_write_data(0b01111111);
		oledDriver_write_data(0b00111110);
		oledDriver_write_data(0b00000000);
		oledDriver_write_data(0b00000000);
		
	}*/



#endif /* GREENFILE_H_ */